<div id="head">
    <span id="logo-text">三方共制的非处方药监管平台</span>
    <span style="font-size: 28px;color: #ece8e8dc;">&emsp;|&emsp;</span>

    <span style="margin-top: 4px;position: absolute;right: 100px;">
            <span style="margin-right: 50px;"><a href="http://101.37.76.80:8080/medinicalVue/#/login">登录</a></span>
            <span>语言:</span>
            <span>
                <select name="language" id="language-select">
                    <option value="中文">中文</option>
                    <option value="English">English</option>
                    <option value="日本語">日本語</option>
                </select>
            </span>
        </span>
</div>
<div id="menu0">
    <div id="menu">
        <ul id="main-menu">

            <li ><a href="./index.html" id="indexPage">首页</a></li>
            <li class="child-show" ><a href="./knowledgeservice.html?code=1001" id="knowledgePage">
                知识服务系统</a>
            </li>
            <li class="child-show" id="m-jia"><a href="./medicine-jia.html">甲类非处方药</a>
            </li>
            <li id="m-yi"> <a href="./medicine-yi.html">乙类非处方药</a></li>
        </ul>
    </div>
</div>

<script type="text/javascript">

    // var num=sessionStorage.getItem("p");
    // //console.log(num)
    // if(num=='index'){
    //     $("#index").css("background-color","rgba(9, 140, 166, 0.33)");
    // }else if(num=='medicine-jia'){
    //     $("#m-jia").css("background-color","rgba(9, 140, 166, 0.33)");
    // }else if(num=='medicine-yi'){
    //     $("#m-yi").css("background-color","rgba(9, 140, 166, 0.33)");
    // }
    
    $(function () {

        var num=sessionStorage.getItem("p");
        /*点击进入不同页面菜单变成不同颜色*/
        var strarr = window.location.href.split("/")
        var str = strarr[strarr.length - 1]
        if (str == "index.html"){
            $("#indexPage").css("backgroundColor",'rgba(9, 140, 166, 0.33)');
        } else if(str.startsWith('knowledgeservice.html')){
            $("#knowledgePage").css("backgroundColor",'rgba(9, 140, 166, 0.33)');
        } else if(num=='medicine-jia'){
            $("#m-jia").css("background-color","rgba(9, 140, 166, 0.33)");
        }else if(num=='medicine-yi'){
            $("#m-yi").css("background-color","rgba(9, 140, 166, 0.33)");
        }

    });
    
    $('#main-menu li a').click(function () {
        var f = this;
        $('#main-menu li a').each(function () {
            // this.className = this == f ? 'active' : 'none';

            this.style.removeProperty('background-color');
            if (this == f){
                this.style.backgroundColor = 'rgba(9, 140, 166, 0.33)';
            }
        });
    });
</script>
